<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<c:set value="${requestScope.response.data.list }" var="list"/>
<!DOCTYPE html>
<html lang="en">
	<head>
		<title>订单列表 - 美妆产品销售系统</title>
		<%@ include file="/common/include/head_title.jsp"%>
	</head>
	<body>
		<jsp:include page="/header"/>
		<div id="mainBody">
			<div class="container">
				<div class="row">
					<%@ include file="/common/include/leftBar.jsp"%>
					<div class="span9">
						<ul class="breadcrumb">
							<li><a href="${rootPath }//main">首页</a><span class="divider">/</span></li>
							<li class="active">我的订单</li>
						</ul>
						<table class="table table-bordered">
							<thead>
								<tr>
									<th>序号</th>
									<th>收货人</th>
									<th title="收货地址">收地</th>
									<th>手机号</th>
									<th>总价格</th>
									<th>折扣</th>
									<th title="应付金额">应金</th>
									<th title="支付方式">支付</th>
									<th>状态</th>
									<th title="下单时间">时间</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${list }" var="listTemp" varStatus="stat">
									<tr>
										<td>${stat.count }</td>
										<td title="${listTemp.goods.name }">
											<a href="${rootPath }/head/orders/ordersUpdate?id=${listTemp.id}" target="_blank">
												${fn:substring(listTemp.receName,0,subStrLen) }
											</a>
										</td>
										<td title="${listTemp.receAddress}">${fn:substring(listTemp.receAddress,0,subStrLen) }</td>
										<td>${listTemp.recePhone}</td>
										<td>${listTemp.totalPrice }</td>
										<td>${listTemp.discount }</td>
										<td>${listTemp.dealAmount }</td>
										<td>${listTemp.payTypeStr }</td>
										<td>${listTemp.statusStr }</td>
										<td>${listTemp.createTime }</td>
										<td>
											<c:if test="${listTemp.status == '1' }">
												<a href="${rootPath }/head/orders/ordersUpdate?operType=pay&id=${listTemp.id}" class="btn btn-danger" target="_blank">
													支付
												</a>
											</c:if>
											<c:if test="${listTemp.status == '4' }">
												<a href="${rootPath }/head/orders/ordersUpdateSubmit?operType=takeGoods&id=${listTemp.id}" onclick="return confirm('确认收货吗?')" class="btn btn-danger" target="_blank">
													收货
												</a>
											</c:if>
										</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		<%@ include file="/common/include/head_footer.jsp"%>
	</body>
</html>